import 'package:flutter/material.dart';
import 'package:hibrid_flutter/widget/dir_image.dart';

import '../../gen/assets.gen.dart';

class ScrollHorizontal extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: const EdgeInsets.only(top: 15),
      height: 50,
      child: ListView(
        padding: const EdgeInsets.only(left: 15),
        scrollDirection: Axis.horizontal,
        children: <Widget>[
          Container(
            margin: const EdgeInsets.only(right: 30),
            child: Row(
              children: [
                Container(
                  padding: const EdgeInsets.all(8),
                  margin: const EdgeInsets.only(right: 6),
                  decoration: const BoxDecoration(
                      borderRadius: BorderRadius.all(Radius.circular(4)),
                      color: Color(0x66e6e6e6)),
                  child: DirImage(
                    url: Assets.images.icShopping.path,
                    width: 25,
                    height: 25,
                  ),
                ),
                Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: const [
                    Text(
                      '抖音商城',
                      textAlign: TextAlign.left,
                      style: TextStyle(
                          color: Colors.black,
                          fontSize: 14,
                          fontWeight: FontWeight.bold,
                          decoration: TextDecoration.none),
                    ),
                    Text(
                      '待使用2',
                      textAlign: TextAlign.left,
                      style: TextStyle(
                          color: Color(0xaa686868),
                          fontSize: 12,
                          decoration: TextDecoration.none),
                    ),
                  ],
                )
              ],
            ),
          ),
          Container(
            margin: const EdgeInsets.only(right: 30),
            child: Row(
              children: [
                Container(
                  padding: const EdgeInsets.all(8),
                  margin: const EdgeInsets.only(right: 6),
                  decoration: const BoxDecoration(
                      borderRadius: BorderRadius.all(Radius.circular(4)),
                      color: Color(0x66e6e6e6)),
                  child: DirImage(
                    url: Assets.images.icLiving.path,
                    width: 25,
                    height: 25,
                  ),
                ),
                Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: const [
                    Text(
                      '直播动态',
                      textAlign: TextAlign.left,
                      style: TextStyle(
                          color: Colors.black,
                          fontSize: 14,
                          fontWeight: FontWeight.bold,
                          decoration: TextDecoration.none),
                    ),
                    Text(
                      '编辑直播动态',
                      textAlign: TextAlign.left,
                      style: TextStyle(
                          color: Color(0xaa686868),
                          fontSize: 12,
                          decoration: TextDecoration.none),
                    ),
                  ],
                )
              ],
            ),
          ),
          Container(
            margin: const EdgeInsets.only(right: 30),
            child: Row(
              children: [
                Container(
                  padding: const EdgeInsets.all(8),
                  margin: const EdgeInsets.only(right: 6),
                  decoration: const BoxDecoration(
                      borderRadius: BorderRadius.all(Radius.circular(4)),
                      color: Color(0x66e6e6e6)),
                  child: DirImage(
                    url: Assets.images.icProgram.path,
                    width: 25,
                    height: 25,
                  ),
                ),
                Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: const [
                    Text(
                      '我的小程序',
                      textAlign: TextAlign.left,
                      style: TextStyle(
                          color: Colors.black,
                          fontSize: 14,
                          fontWeight: FontWeight.bold,
                          decoration: TextDecoration.none),
                    ),
                    Text(
                      '最近使用',
                      textAlign: TextAlign.left,
                      style: TextStyle(
                          color: Color(0xaa686868),
                          fontSize: 12,
                          decoration: TextDecoration.none),
                    ),
                  ],
                )
              ],
            ),
          ),
        ],
      ),
    );
  }
}
